package com.itheima.springbootwebtlias.mapper;

import com.itheima.springbootwebtlias.pojo.Emp;
import com.itheima.springbootwebtlias.pojo.EmpQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper {
    List<Emp> selectbyCondition(EmpQueryParam queryParam);

    void insert(Emp emp);


    List<Emp> selectEmp();

    void removeEmp(List<Integer> ids);

    @Select("select * from emp where id = #{id};")
    Emp queryByIdEmp(Integer id);

    void updataEmp(Emp emp);

    Integer selectByDeptId(Integer id);

    @MapKey("name")
    List<Map> JobCount();

    @MapKey("name")
    List<Map> genderCount();

    @Select("select * from emp where username = #{username};")
    Emp selectByUsername(String username);


//    void selectbyCondition(EmpQueryParam queryParam);
}
